#include "HumanMethodAdd.h"
#include "ChessBoard.h"
#include "GameActivity.h"
#include "GameRule.h"
#include "Player.h"
#include <vector>
HumanMethodAdd::HumanMethodAdd()
{
}

void HumanMethodAdd::doChess(ChessBoard * chessBoard, GameRule * gameRule, Player * player){
    QPoint position;
    std::vector<QPoint>* qPointList = new std::vector<QPoint>;
    while(!GameActivity::isEnd && !gameRule->checkAddPoint(position = chessBoard->getPosition(),player));
    if(GameActivity::isEnd)
        return;
    qPointList->push_back(position);
    gameRule->putChess(qPointList,player);
    return;
}
